<?php
include("inc_configuration.php");
function createQuery($matchId,$type,$teamId,$count)	//type: Tor=1, Gelb=2, Gelb-Rot=3, Rot=4, Elfmeter=5, Eigentor=6
{
	$tq = "SELECT 
					l.playerId AS playerId, 
					l.minute AS minute 
				FROM 
					$tbl_events l, 
					$tbl_players p, 
					$tbl_teams t 
				WHERE 
					l.matchId=$matchId AND 
					l.type=$type AND 
					l.playerId=p.id AND 
					p.teamId=t.id AND 
					t.id=$teamId";
	$tqe = mysql_query($tq);
	$count = mysql_num_rows($tqe);
	
	return $tqe;

}





?>